using UnityEngine;
using System.Collections;

public class SaveStateButton : MonoBehaviour {
	
	void Update(){
		if(THistory.Instance.isUndoing()){
			gameObject.GetComponent<UIButton>().isEnabled = false;
		}else{
			gameObject.GetComponent<UIButton>().isEnabled = true;
		}
	}
	
	void OnClick(){
		InfoDisplay.Instance.displayMessage("etat sauvegarde",2);
		StatesHandler.Instance.saveState();
		
		StatsHandler.Instance.addState();
	}	
}
